package com.javalab._7thread._1Create._3Callable;

import java.util.concurrent.Callable;

/**
 * 实现Callable的方式编写线程类
 * 使用泛型，并且支持返回值
 */
public class MyCallable implements Callable<Integer> {

    private Integer a;
    private Integer b;
    public MyCallable(Integer a, Integer b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public Integer call() throws Exception {
        return a / b;
    }
}
